import { createDiscreteApi } from "naive-ui";
import type { DialogApiInjection } from "naive-ui/es/dialog/src/DialogProvider";
import type { LoadingBarApiInjection } from "naive-ui/es/loading-bar/src/LoadingBarProvider";
import type { MessageApiInjection } from "naive-ui/es/message/src/MessageProvider";
import type { NotificationApiInjection } from "naive-ui/es/notification/src/NotificationProvider";
const { message, notification, dialog, loadingBar } = createDiscreteApi([
  "message",
  "dialog",
  "notification",
  "loadingBar",
]);

interface Naiveui {
  message: MessageApiInjection;
  notification: NotificationApiInjection;
  dialog: DialogApiInjection;
  loadingBar: LoadingBarApiInjection;
}
const naiveui: Naiveui = {
  //@ts-ignore
  message,
  notification,
  //@ts-ignore
  dialog,
  loadingBar,
};
// naiveui.message =message
export default naiveui;
